def make_lemonade(count):
    assert count > 0
    print(f"制作了{count * 2}杯柠檬汁")


def out_of_stock():
    print("库存不够了")


def try_make_lemonade(fresh_fruit):
    count = fresh_fruit.get("lemon", 0)
    if count:
        make_lemonade(count)
    else:
        out_of_stock()


try_make_lemonade(
    {
        "apple": 10,
        "banana": 8,
        "lemon": 5,
    }
)

try_make_lemonade(
    {
        "apple": 10,
        "banana": 8,
    }
)
